// 定义详情模块数据的 ts 类型
export interface ResponseData {
    code: number,
    message: string,
    ok: boolean
}

// 代表医院详情的数据
export interface HospitalDetail {
    "bookingRule": {
        "cycle": number,
        "releaseTime": string,
        "stopTime": string,
        "quitDay": number,
        "quitTime": string,
        "rule": [
            string
        ]
    },
    "hospital": {
        "id": string,
        "createTime": string,
        "updateTime": string,
        "isDeleted": number,
        "param": {
            "hostypeString": string,
            "fullAddress": string
        },
        "hoscode": string,
        "hosname": string,
        "hostype": string,
        "provinceCode": string,
        "cityCode": string,
        "districtCode": string,
        "address": string,
        "logoData": string,
        "intro": string,
        "route": string,
        "status": number,
        "bookingRule": null
    }
}

// 医院详情接口返回数据的 ts 
export interface HospitalDetailData extends ResponseData {
    data: HospitalDetail
}

// 医院科室数据
export interface Department {
    depcode: string,
    depname: string,
    // ? 可有可无
    children?: [Department]
}

// 医院科室数组
export type DepartmentArr = Department[]

// 医院科室接口返回的数据
export interface DepartmentData extends ResponseData {
    data: DepartmentArr
}

// 预约挂号的数据
export interface BaseMap {
    workDateString: string,
    releaseTime: string,
    bigname: string,
    stopTime: string,
    depname: string,
    hosname: string
}
export interface BookingSchedule {
    workDate: string,
    workDateMd: string,
    dayOfWeek: string,
    docCount: number,
    reservedNumber: null,
    availableNumber: number,
    status: number
}
export type BookingScheduleList = BookingSchedule[]
// 预约挂号接口返回的数据的 data 数据类型
export interface HospitalWork {
    total: number,
    bookingScheduleList: BookingScheduleList,
    baseMap: BaseMap
}
export interface HospitalWorkData extends ResponseData {
    data: HospitalWork
}

// 医生排班的数据
export interface Doctor {
    "id": string,
    "createTime": string,
    "updateTime": string,
    "isDeleted": number,
    "param": {
        "dayOfWeek": string,
        "depname": string,
        "hosname": string
    },
    "hoscode": string,
    "depcode": string,
    "title": string,
    "docname": string,
    "skill": string,
    "workDate": string,
    "workTime": number,
    "reservedNumber": number,
    "availableNumber": number,
    "amount": number,
    "status": number,
    "hosScheduleId": string
}
export type DoctorArr = Doctor[]
export interface DoctorData extends ResponseData {
    data: DoctorArr
}

// 就诊人数据
export interface Visitor {
    id: number,
    createTime: string,
    updateTime: string,
    isDeleted: number,
    param: {
        certificatesTypeString: string,
        contactsCertificatesTypeString: string,
        cityString: null,
        fullAddress: string,
        districtString: null,
        provinceString: null
    },
    userId: number,
    name: string,
    certificatesType: string,
    certificatesNo: string,
    sex: number,
    birthdate: string,
    phone: string,
    isMary: number,
    provinceCode: null,
    ciryCode: null,
    districtCode: null,
    address: string,
    contactsName: string,
    contactsCertificatesType: string,
    consactsCertificatesNo: string,
    contactsPhone: string,
    isInsure: number,
    cardNo: null,
    status: string
}
export type VisitorArr = Visitor[]
export interface VisitorData extends ResponseData {
    data: VisitorArr
}

// 排班数据
export interface ScheduleData extends ResponseData {
    data: Doctor
}

// 创建订单接口返回的数据
export interface SubmitOrderData extends ResponseData {
    data: number
}
